//
// Created by 莫吉米 on 16/8/9.
//

#ifndef IYOGO_CONNECTOR_H
#define IYOGO_CONNECTOR_H


class Connector {
private:
    MYSQL mysql;
    MYSQL_RES* queryres;
    MYSQL_ROW row;
public:
    Connector();
    ~Connector();
    void Connect(string host,string user,string passwd,string db,unsigned int port=3306,const char*socket=NULL,unsigned long flag=0);
    int Query(string sql);
    void Update(string sql);
    int FetchRow();
    string Getstring(int index);
    int Getint(int index);

};


#endif //IYOGO_CONNECTOR_H
